package studio.raptor.databus.command;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Created  on 2017/4/25.
 */
public class EventBusinessData implements Serializable {

    private static final long serialVersionUID = 2259873569305931623L;
    /**
     * 数据提供方式(事件内携带完整实体数据/调用数据提供服务获取实体数据)
     */
    @NotNull(message = "provideType should not be null")
    private EventBusinessDataProvideType provideType ;
    /**
     * 数据格式(JSON/XML/自定义)
     */
    @NotNull(message = "dataType should not be null")
    private EventBusinessDataType dataType ;
    /**
     * 数据内容
     */
    private String content;
    /**
     * 数据提供服务
     */
    private String dataService;

    public EventBusinessDataProvideType getProvideType() {
        return provideType;
    }

    public void setProvideType(EventBusinessDataProvideType provideType) {
        this.provideType = provideType;
    }

    public EventBusinessDataType getDataType() {
        return dataType;
    }

    public void setDataType(EventBusinessDataType dataType) {
        this.dataType = dataType;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getDataService() {
        return dataService;
    }

    public void setDataService(String dataService) {
        this.dataService = dataService;
    }

    @Override
    public String toString() {
        return "EventBusinessData{" +
                "provideType='" + provideType + '\'' +
                ", dataType='" + dataType.getValue() + '\'' +
                ", content='" + content + '\'' +
                ", dataService='" + dataService + '\'' +
                '}';
    }


}
